﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace EBA.Framework
{
    /// <summary>
    /// 插件配置节点
    /// </summary>
    public class BundleConfigurationElement : ConfigurationElement
    {
        /// <summary>
        /// 标识
        /// </summary>
        [ConfigurationProperty("id", IsRequired = true)]
        public string Id
        {
            get { return (string)this["id"]; }
            set { this["id"] = value; }
        }

        /// <summary>
        /// 名称
        /// </summary>
        [ConfigurationProperty("name", IsRequired = true)]
        public string Name
        {
            get { return (string)this["name"]; }
            set { this["name"] = value; }
        }

        /// <summary>
        /// 描述
        /// </summary>
        [ConfigurationProperty("description", IsRequired = true)]
        public string Description
        {
            get { return (string)this["description"]; }
            set { this["description"] = value; }
        }

        /// <summary>
        /// 版本
        /// </summary>
        [ConfigurationProperty("version", IsRequired = true)]
        public string Version
        {
            get { return (string)this["version"]; }
            set { this["version"] = value; }
        }

        /// <summary>
        /// 对应上下文名称
        /// </summary>
        [ConfigurationProperty("context", IsRequired = true)]
        public string Context
        {
            get { return (string)this["context"]; }
            set { this["context"] = value; }
        }

        /// <summary>
        /// 文件列表
        /// </summary>
        [ConfigurationProperty("files", IsRequired = false)]
        public FileConfigurationElementCollection Files
        {
            get
            {
                return (FileConfigurationElementCollection)this["files"];
            }
            set
            {
                this["files"] = (object)value;
            }
        }
    }
}
